#include "SR04.h"
void SR04_init()
{
  pinMode(Trig,OUTPUT);
  pinMode(Echo,INPUT);
}
int SR04_distance()
{
digitalWrite(Trig,LOW);
delayMicroseconds(2);
digitalWrite(Trig,HIGH);
delayMicroseconds(10);
digitalWrite(Trig,LOW);  
int distance=pulseIn(Echo,HIGH)*0.017;
Serial.println(distance,DEC);

delay(70);

return distance; 
}


